package editAir.water
{
	import _Pan3D.display3D.Display3DContainer;
	import _Pan3D.program.Program3DManager;
	
	import _me.Scene_data;
	
	import editAir.lightScene.PerlinDisplayShader;
	
	import flash.display3D.Context3D;
	import flash.display3D.Program3D;

	public class WaterLevel
	{
		private var _display3DContainer:Display3DContainer;
		private var _context3D:Context3D;
		private var _erlinDisplay3DSprite:WaterDisplay3DSprite;
		public function WaterLevel()
		{
			_display3DContainer=new Display3DContainer();
			_context3D=Scene_data.context3D;
		    initSprites()
		}
		
		private function initSprites():void
		{
			// TODO Auto Generated method stub
			//加载柏林噪音
			_erlinDisplay3DSprite =new WaterDisplay3DSprite(_context3D);
			_erlinDisplay3DSprite.url ="water1";
			_erlinDisplay3DSprite.x=500;
			_erlinDisplay3DSprite.y=-15;
			_erlinDisplay3DSprite.z=500;
			_erlinDisplay3DSprite.scale=1;
			_display3DContainer.addChild(_erlinDisplay3DSprite);
			
			var treeShaderProgram3d:Program3D=Program3DManager.getInstance().getProgram(PerlinDisplayShader.PERLIN_DISPAY_SHADER);
			_erlinDisplay3DSprite.newprogram=treeShaderProgram3d;
	
			
		}
		public function upData():void
		{
			
			_display3DContainer.update();
			
		}
		
	}
}